#include "ActionSelector.h"

ActionSelector::ActionSelector()
{
}

ActionSelector::~ActionSelector()
{
}

void ActionSelector::registerAction(std::string key,Action *a) {
	actionMapping.insert(std::pair<std::string,Action*>(key,a));
}
	Action* ActionSelector::select(AttributeHolder *attributes,std::string key) {
		std::map<std::string,Action*>::const_iterator it;
		it = actionMapping.find(key);
		if (it==actionMapping.end()) {
			return 0;
		}
		else {
			Action *a = it->second;
			return a;
		}
		
	}
	
	